package com.example.demo.app;

import com.example.demo.domain.app.vo.CategoryInfoVO;
import com.example.demo.domain.base.BaseResult;
import com.example.demo.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 商品分类
 *
 * @author haochen78
 * @date 2025/11/7 15:01
 **/
@RestController
@RequestMapping("/app/shop/goods/category")
public class CategoryController {
    
    @Autowired
    private ProductCategoryService productCategoryService;
    
    @GetMapping("/all")
    public BaseResult<List<CategoryInfoVO>> categoryList(){
        return BaseResult.success(productCategoryService.all());
    }
}
